<form class="form-inline" id="tag_list_form">
	<div class="form-group">
		<div class="input-group">
			<div class="input-group-addon">开始时间</div>
			<input type="text" class="form-control" name="startTime" id="start_time" />
			<div class="input-group-addon">结束时间</div>
			<input type="text" class="form-control" name="endTime" id="end_time" />
		</div>
		<div class="input-group">
			<div class="input-group-addon">PV有效阀值</div>
			<input type="text" class="form-control" name="pvEffective" id="pv_effective" value="10" />
		</div>
	</div>
	<button type="button" class="btn btn-primary" onclick="query_tag_list('#tag_list_grid', '/m/ie/scene/overviewList.json')" >查询</button>
</form>
<table id="tag_list_grid" data-toggle="table" data-toolbar="#tag_list_form" data-unique-id="date" data-query-params="tag_query_params" data-click-to-select="true" data-page-size="100">
	<thead>
	    <tr>
	    	<th data-field="date">日期</th>
	    	<th data-field="total">总场景数</th>
	    	<th data-field="effective">有效场景量</th>
	    	<th data-field="effectiveRatio">场景有效率</th>
	    	<!--th data-valign="middle" data-field="date" data-align="center" data-formatter="business_operation_format" class="action-buttons" data-width="130">详情</th-->				
	    </tr>
    </thead>
</table>

<script type="text/javascript">
	$(document).ready(function() {
	///日期控件
		$('#start_time,#end_time').datetimepicker({
		    todayBtn: 1,
		    autoclose: 1,
		    forceParse: 0,
		    todayHighlight:1,
		    format: 'yyyy-mm-dd',
		    minView: 2
		});
	});
//查询
    function query_tag_list(id, url) {
        $(id).bootstrapTable('refresh', {url: url});
    }  
     function tag_query_params(params) {
        $('#tag_list_form :input').each(function() {
            if($(this).attr('name')) {
                params[$(this).attr('name')] = $(this).val();
            }
        });
        return params;
    }
    function business_operation_format(value, item) {
        return '<button type="button" class="btn btn-link" onclick="openUpdatetagWin('+value+')">场景列表</button>';
    }
    function user_type_formatter(value) {
    	if(value==1) return "普通账号";
    	if(value==2) return "企业账号";
    	if(value==3) return "高级账户";
    	if(value==4) return "服务账号";
    	if(value==21) return "企业子账号";
    	if(value==99) return "运维账号";
    	return value;
    }
    
</script>